<html>
<head>

<script language="Javascript">

var exp = opener.thedata;
document.write('<applet name="DragMath" codebase="dragmath/" code="Display.MainApplet.class" archive= "ddma.jar, lib/AbsoluteLayout.jar, lib/jdom.jar, lib/JEP.jar, lib/swing-layout-1.0.jar"  width=540  height=310 >',
                  '<param name= hideMenu value= "true" >',
                  '<param name= customToolbar value= "0 | 3 4 | 5 6 7" >',
                  '<param name=language value="en">',
                   '<param name=outputFormat value="WeBWorK">',
		'<param name= implicitMultiplication value= "false" > ',
	     '<param name=openWithExpression value="' + exp + '">',
	     'To use this page you need a Java-enabled browser. Download the latest Java plug-in from <a href="http://www.java.com">Java.com</a>',
	     '</applet>');

var whichone;
function writedata()
{
    whichone = opener.thenumber

}

function updateit()
{
    var applet = document.DragMath;
    var ans = document.DragMath.getMathExpression();
    opener.document.forms[opener.theform].elements[opener.thenumber].value = ans;
    window.close();
}
</script>
<body onload="writedata()">


<form name="checkit">
<input type="hidden" cols="20" id="data" />
<br />
<input type="button" value="Save &amp; Close" onclick="updateit()">
</body>
</html>
